package com.lsb.fitnessnutrition

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import org.tensorflow.lite.examples.classification.R
import androidx.navigation.Navigation
import kotlinx.android.synthetic.main.fragment_first.view.*

class FirstFragment : Fragment() {

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        val view = inflater.inflate(R.layout.fragment_first, container, false)

        view.tf_squat_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_modelHelperSquat2)
        }

        view.tutorial_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_tutorialActivity)
        }

        view.check_plan2_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_listPlan2Activity)
        }

        view.tf_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_modelHelper)
        }

        view.search_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_foodSearchActivity)
        }

        view.preset_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_inputOneRMFragment)
        }

        view.check_power_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_listPowerActivity)
        }

        view.check_btn.setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_firstFragment_to_listPlanActivity)
        }
        return view
    }

}